home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / gnumake.zip / JOB.H < prev    next >
C/C++ Source or Header  |  1994-06-07  |  2KB  |  68 lines

  1. /* Definitions for managing subprocesses in GNU Make.
  2. Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  3. This file is part of GNU Make.
  4.  
  5. GNU Make is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. GNU Make is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with GNU Make; see the file COPYING.  If not, write to
  17. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Structure describing a running or dead child process.  */
  20.  
  21. struct child
  22.   {
  23.     struct child *next;        /* Link in the chain.  */
  24.  
  25.     struct file *file;        /* File being remade.  */
  26.  
  27.     char **environment;        /* Environment for commands.  */
  28.  
  29.     char **command_lines;    /* Array of variable-expanded cmd lines.  */
  30.     unsigned int command_line;    /* Index into above.  */
  31.     char *command_ptr;        /* Ptr into command_lines[command_line].  */
  32.  
  33.     pid_t pid;            /* Child process's ID number.  */
  34.     unsigned int remote:1;    /* Nonzero if executing remotely.  */
  35.  
  36.     unsigned int noerror:1;    /* Nonzero if commands contained a `-'.  */
  37.  
  38.     unsigned int good_stdin:1;    /* Nonzero if this child has a good stdin.  */
  39.     unsigned int deleted:1;    /* Nonzero if targets have been deleted.  */
  40.   };
  41.  
  42. extern struct child *children;
  43.  
  44. extern void new_job ();
  45. extern void reap_children ();
  46. extern void start_waiting_jobs ();
  47.  
  48. extern char **construct_command_argv ();
  49. #ifndef __EMX__
  50. extern void child_execute_job ();
  51. extern void exec_command ();
  52. #else
  53. extern int child_execute_job ();
  54. extern int exec_command ();
  55. #endif
  56. extern unsigned int job_slots_used;
  57.  
  58. #ifdef POSIX
  59. extern void unblock_sigs ();
  60. #else
  61. #ifdef    HAVE_SIGSETMASK
  62. extern int fatal_signal_mask;
  63. #define    unblock_sigs()    sigsetmask (0)
  64. #else
  65. #define    unblock_sigs()
  66. #endif
  67. #endif
  68.